﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAO;
using DTO;

namespace BUS
{
    public class BUS_Comment
    {
        private DAO_Comment dao;

        public BUS_Comment()
        {
            dao = new DAO_Comment();
        }
        public List<DTO_Comment1> dto()
        {
            return dao.LayDanhSach();
        }
        public List<DTO_Comment1> TimKiemCMTheoKM(string ten)
        {
            return dao.TimKiemCMTheoKM(ten);
        }
        public List<DTO_Comment1> TimKiemTheoTen(string ten)
        {
            return dao.TimKiemTheoTen(ten);
        }
        public List<DTO_Comment1> TimKiemTheoKM(string KM)
        {
            return dao.TimKiemTheoKM(KM);
        }
        public List<DTO_Comment1> TimKiemTheoMaCM(int MaCM)
        {
            return dao.TimKiemTheoMaCM(MaCM);
        }
        public bool Update(int MaCM, string text)
        {
            return dao.Update(MaCM, text);
        }
        public bool Delete(int MaCM)
        {
            return dao.Delete(MaCM);
        }
        public bool insertCM(DTO_Comment dto )
        {
            return dao.insertCM(dto);
        }
    }
}
